package com.ddxz.eversec.persistence.controller;

import com.ddxz.eversec.persistence.mapper.QueryMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2021/7/12
 */

@RestController
public class QueryController {
    @Autowired
    private QueryMapper mapper;

    @GetMapping("/list")
    public Object getList() {
        PageHelper.startPage(1, 10);
        Page<Map<String, Object>> items = mapper.getList();

        return items;
    }
}
